﻿CREATE TABLE [dbo].[UDS_Assign_Rule] (
    [Rule_ID]     int NOT NULL identity(1, 1),
    [Act_ID]      int NULL,
    [Based_On]    int NULL,  /* position 1; team: 2; role: 3; staff: 4 */
    [Position_ID] int NULL CONSTRAINT [DF_UDS_Assign_Rule_Position_ID] default(((0))),
    [Team_ID]     int NULL CONSTRAINT [DF_UDS_Assign_Rule_Team_ID] default(((0))),
    [Role_ID]     int NULL CONSTRAINT [DF_UDS_Assign_Rule_Role_ID] default(((0))),
    [Staff_ID]    int NULL CONSTRAINT [DF_UDS_Assign_Rule_Staff_ID] default(((0)))
);
GO

SET NOCOUNT ON;
INSERT INTO dbo.[UDS_Assign_Rule] (Act_ID, Based_ON, Role_ID) VALUES(1, 3 /* role */, 1);
INSERT INTO dbo.[UDS_Assign_Rule] (Act_ID, Based_ON, Role_ID) VALUES(2, 3 /* role */, 1);
INSERT INTO dbo.[UDS_Assign_Rule] (Act_ID, Based_ON, Role_ID) VALUES(3, 3 /* role */, 1);
INSERT INTO dbo.[UDS_Assign_Rule] (Act_ID, Based_ON, Role_ID) VALUES(4, 3 /* role */, 1);
INSERT INTO dbo.[UDS_Assign_Rule] (Act_ID, Based_ON, Role_ID) VALUES(5, 3 /* role */, 1);
INSERT INTO dbo.[UDS_Assign_Rule] (Act_ID, Based_ON, Role_ID) VALUES(6, 3 /* role */, 1);
INSERT INTO dbo.[UDS_Assign_Rule] (Act_ID, Based_ON, Role_ID) VALUES(7, 3 /* role */, 1);
INSERT INTO dbo.[UDS_Assign_Rule] (Act_ID, Based_ON, Role_ID) VALUES(8, 3 /* role */, 1);
INSERT INTO dbo.[UDS_Assign_Rule] (Act_ID, Based_ON, Role_ID) VALUES(9, 3 /* role */, 1);
INSERT INTO dbo.[UDS_Assign_Rule] (Act_ID, Based_ON, Role_ID) VALUES(10, 3 /* role */, 1);
INSERT INTO dbo.[UDS_Assign_Rule] (Act_ID, Based_ON, Role_ID) VALUES(11, 3 /* role */, 1);
INSERT INTO dbo.[UDS_Assign_Rule] (Act_ID, Based_ON, Role_ID) VALUES(12, 3 /* role */, 1);
GO